def lucky_sum(a, b, c):
  if a !=13 and b !=13 and c!=13:
    return a+b+c
  else:
    if c==13 and a!=13 and b!=13:
      return a+b
    else:
      if a==13:
        return 0
      else:
        return a
    